{extend name="base" /}

{block name="content"}
<script language="javascript" type="text/javascript" src="__STATIC__/public/My97DatePicker/WdatePicker.js"></script>
{include file="public:editor"/}

<div class="g-main">

    <div class="m-main-title">

        <div class="m-container-fluid">

            <a href="{:url('index/welcome')}"><i class="icon icon-home"></i>首页</a>

            <span class="icon-angle-right"></span>

            <span>系统</span>

            <span class="icon-angle-right"></span>

            <span>分销管理</span>

            <span class="icon-angle-right"></span>

            <span>分销设置</span>

            <a class="u-flush"><i class="icon-repeat"></i></a>

        </div>

    </div>

    <div class="m-main-content">

        <div class="m-container">

            <div class="m-tab-tit clearfix">

                <ul>

                    <li><a href="javascript:;">基本设置</a></li>

                    <li><a href="javascript:;">下线关系</a></li>

                    <li><a href="javascript:;">分销资格</a></li>

                    <li><a href="javascript:;">结算设置</a></li>

                    <li><a href="javascript:;">申请设置</a></li>

                    <li><a href="javascript:;">文字设置</a></li>

                </ul>

            </div>

            <div class="m-form mt-10">

                <form class="layui-form" id="j_form">

                    <div class="m-tab-con">

                        <table class="m-table">

                            <thead>

                            <tr>

                                <th colspan="2">基本设置</th>

                            </tr>

                            </thead>

                            <tbody>

                            <tr>
                                <td width="15%"><label>分销层级</label></td>
                                <td>
                                    <input type="radio" lay-filter="commission_level" name="db[commission_level]" value="0" title="不开启" {if
                                           condition=" isset($db['commission_level']) && ($db['commission_level'] eq 0)"
                                           } checked{/if}  />
                                    <input type="radio" lay-filter="commission_level" name="db[commission_level]" value="1" title="一级分销" {if
                                           condition=" isset($db['commission_level']) && ($db['commission_level'] eq 1)"
                                           } checked{/if} />
                                    <input type="radio" lay-filter="commission_level" name="db[commission_level]" value="2" title="二级分销" {if
                                           condition=" isset($db['commission_level']) && ($db['commission_level'] eq 2)"
                                           } checked{/if} />
                                </td>
                            </tr>

                            <tr id="commission_charge_type">
                                <td width="15%"><label>佣金类型</label></td>
                                <td>
                                    <input type="radio" lay-filter="commission_charge_type" name="db[commission_charge_type]" value="1" title="百分比" {if
                                           condition=" isset($db['commission_charge_type']) && ($db['commission_charge_type'] eq 1)"
                                           } checked{/if} />
                                    <input type="radio" lay-filter="commission_charge_type"  name="db[commission_charge_type]" value="0" title="固定金额" {if
                                           condition=" isset($db['commission_charge_type']) && ($db['commission_charge_type'] eq 0)"
                                           } checked{/if} />
                                </td>
                            </tr>

                            <tr id="commission_charge_first">
                                <td><label>一级佣金</label></td>
                                <td><input type="text" name="db[commission_charge_first]" class="u-ipt u-ipt-def"
                                           value="{$db.commission_charge_first|default=''}"/><span class="danwei">元</span></td>
                            </tr>
                            <tr id="commission_charge_second">
                                <td><label>二级佣金</label></td>
                                <td><input type="text" name="db[commission_charge_second]" class="u-ipt u-ipt-def"
                                           value="{$db.commission_charge_second|default=''}"/><span class="danwei">元</span></td>
                            </tr>

                            <tr>
                                <td width="15%"><label>分销内购</label></td>
                                <td>
                                    <input type="radio" name="db[commission_self_buy]" value="1" title="是" {if
                                           condition=" isset($db['commission_self_buy']) && ($db['commission_self_buy'] eq 1)"
                                           } checked{/if} />
                                    <input type="radio" name="db[commission_self_buy]" value="0" title="否" {if
                                           condition=" isset($db['commission_self_buy']) && ($db['commission_self_buy'] eq 0)"
                                           } checked{/if} />
                                </td>
                            </tr>

                            <tr>
                                <td width="15%"><label>佣金显示</label></td>
                                <td>
                                    <input type="radio" name="db[commission_charge_show]" value="1" title="是" {if
                                           condition=" isset($db['commission_charge_show']) && ($db['commission_charge_show'] eq 1)"
                                           } checked{/if} />
                                    <input type="radio" name="db[commission_charge_show]" value="0" title="否" {if
                                           condition=" isset($db['commission_charge_show']) && ($db['commission_charge_show'] eq 0)"
                                           } checked{/if} />
                                </td>
                            </tr>

                            <tr>
                                <td width="15%"><label>分销海报显示</label></td>
                                <td>
                                    <input type="radio" name="db[commission_poster_show]" value="1" title="是" {if
                                           condition=" isset($db['commission_poster_show']) && ($db['commission_poster_show'] eq 1)"
                                           } checked{/if} />
                                    <input type="radio" name="db[commission_poster_show]" value="0" title="否" {if
                                           condition=" isset($db['commission_poster_show']) && ($db['commission_poster_show'] eq 0)"
                                           } checked{/if} />
                                </td>
                            </tr>

                            <tr>
                                <td width="15%"><label>排行榜显示</label></td>
                                <td>
                                    <input type="radio" name="db[commission_ranking_show]" value="1" title="是" {if
                                           condition=" isset($db['commission_ranking_show']) && ($db['commission_ranking_show'] eq 1)"
                                           } checked{/if} />
                                    <input type="radio" name="db[commission_ranking_show]" value="0" title="否" {if
                                           condition=" isset($db['commission_ranking_show']) && ($db['commission_ranking_show'] eq 0)"
                                           } checked{/if} />
                                </td>
                            </tr>


                            </tbody>

                        </table>

                    </div>

                    <div class="m-tab-con dn">

                        <table class="m-table">

                            <thead>

                            <tr>

                                <th colspan="2">下线关系</th>

                            </tr>

                            </thead>

                            <tbody>

                            <tr>
                                <td width="15%"><label>成为下线条件</label></td>
                                <td>
                                    <input type="radio" name="db[commission_become_child]" value="1" title="首次进入" {if
                                           condition=" isset($db['commission_become_child']) && ($db['commission_become_child'] eq 1)"
                                           } checked{/if} />
                                    <input type="radio" name="db[commission_become_child]" value="2" title="首次下单" {if
                                           condition=" isset($db['commission_become_child']) && ($db['commission_become_child'] eq 2)"
                                           } checked{/if} />
                                    <input type="radio" name="db[commission_become_child]" value="3" title="首次付款" {if
                                           condition=" isset($db['commission_become_child']) && ($db['commission_become_child'] eq 3)"
                                           } checked{/if} />
                                </td>
                            </tr>


                            </tbody>

                        </table>

                    </div>

                    <div class="m-tab-con dn">

                        <table class="m-table">

                            <thead>

                            <tr>

                                <th colspan="3">分销资格</th>

                            </tr>

                            </thead>

                            <tbody>

                            <tr>
                                <td width="15%"><label>成为分销商条件</label></td>
                                <td>
                                    <input type="radio" lay-filter="commission_become"  name="db[commission_become]" value="0" title="无条件" {if
                                           condition=" isset($db['commission_become']) && ($db['commission_become'] eq 0)"
                                           } checked{/if} />
                                    <input type="radio" lay-filter="commission_become" name="db[commission_become]" value="1" title="申请" {if
                                           condition=" isset($db['commission_become']) && ($db['commission_become'] eq 1)"
                                           } checked{/if} />
                                    <input type="radio" lay-filter="commission_become" name="db[commission_become]" value="2" title="消费次数" {if
                                           condition=" isset($db['commission_become']) && ($db['commission_become'] eq 2)"
                                           } checked{/if} />
                                    <input type="radio" lay-filter="commission_become" name="db[commission_become]" value="3" title="消费额度" {if
                                           condition=" isset($db['commission_become']) && ($db['commission_become'] eq 3)"
                                           } checked{/if} />
                                    <input type="radio" lay-filter="commission_become" name="db[commission_become]" value="4" title="购买商品" {if
                                           condition=" isset($db['commission_become']) && ($db['commission_become'] eq 4)"
                                           } checked{/if} />
                                </td>
                            </tr>
                            <tr id="commission_become_order_count">

                                <td><label>分销商消费必须达</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer"
                                           name="db[commission_become_order_count]"
                                           value="{$db.commission_become_order_count|default=''}"/><span>次</span></td>

                            </tr>
                            <tr id="commission_become_money_count">

                                <td><label>分销商消费必须达</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer"
                                           name="db[commission_become_money_count]"
                                           value="{$db.commission_become_money_count|default=''}"/><span>元</span></td>

                            </tr>

                            <tr id="commission_become_goods_id">

                                <td><label>分销商必须购买</label></td>

                                <td>
                                    <div class="lay-select m-select-def">
                                        <select name="commission_become_goods_id" lay-filter="commission_become_goods_id">
                                            <option value="0">请选择商品</option>
                                            {if isset($db['commission_become_goods_id'])}
                                            {foreach name="goods" item="v"}
                                            <option value="{$v.id}"{if condition="$db['commission_become_goods_id'] eq $v['id']"} selected{/if}>{$v.goods_name}</option>
                                            {/foreach}
                                            {/if}
                                        </select>
                                    </div>

                                </td>

                            </tr>


                            <tr>
                                <td width="15%"><label>分销商是否需要审核</label></td>
                                <td>
                                    <input type="radio" name="db[commission_become_check]" value="1" title="是" {if
                                           condition=" isset($db['commission_become_check']) && ($db['commission_become_check'] eq 1)"
                                           } checked{/if} />
                                    <input type="radio" name="db[commission_become_check]" value="0" title="否" {if
                                           condition=" isset($db['commission_become_check']) && ($db['commission_become_check'] eq 0)"
                                           } checked{/if} />
                                </td>
                            </tr>


                            </tbody>

                        </table>

                    </div>

                    <div class="m-tab-con dn">

                        <table class="m-table">

                            <thead>

                            <tr>

                                <th colspan="4">结算设置</th>

                            </tr>

                            </thead>

                            <tbody>

                            <tr>
                                <td width="15%"><label>提现方式</label></td>
                                <td>
                                    <input type="checkbox" name="db[commission_withdraw_type][]" title="提现到微信" value="1"
                                           lay-skin="primary" {if
                                           condition="isset($db['commission_withdraw_type']) && is_array($db['commission_withdraw_type']) && in_array(1, $db['commission_withdraw_type'])"
                                           } checked{/if}>
                                    <input type="checkbox" name="db[commission_withdraw_type][]" title="提现到支付宝"
                                           value="2" lay-skin="primary" {if
                                           condition="isset($db['commission_withdraw_type']) && is_array($db['commission_withdraw_type']) && in_array(2, $db['commission_withdraw_type'])"
                                           } checked{/if}>
                                    <input type="checkbox" name="db[commission_withdraw_type][]" title="提现到银行卡"
                                           value="3" lay-skin="primary" {if
                                           condition="isset($db['commission_withdraw_type']) && is_array($db['commission_withdraw_type']) && in_array(3, $db['commission_withdraw_type'])"
                                           } checked{/if}>
                                    <input type="checkbox" name="db[commission_withdraw_type][]" title="提现到商城余额"
                                           value="4" lay-skin="primary" {if
                                           condition="isset($db['commission_withdraw_type']) && is_array($db['commission_withdraw_type']) && in_array(4, $db['commission_withdraw_type'])"
                                           } checked{/if}>
                                </td>
                            </tr>

                            <tr>

                                <td><label for="commission_withdraw_least">最少提现额度</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer" name="db[commission_withdraw_least]"
                                           id="commission_withdraw_least"
                                           value="{$db.commission_withdraw_least|default=''}"/><span>元</span></td>

                            </tr>

                            <tr>

                                <td><label for="commission_withdraw_charge">提现手续费</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer" name="db[commission_withdraw_charge]"
                                           id="commission_withdraw_charge"
                                           value="{$db.commission_withdraw_charge|default=''}"/><span>%</span></td>

                            </tr>

                            <tr>

                                <td><label for="commission_settle_days">佣金计算天数</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer" name="db[commission_settle_days]"
                                           id="commission_settle_days"
                                           value="{$db.commission_settle_days|default=''}"/><span>天</span></td>

                            </tr>


                            </tbody>

                        </table>

                    </div>

                    <div class="m-tab-con dn">

                        <table class="m-table">

                            <thead>

                            <tr>

                                <th colspan="5">申请设置</th>

                            </tr>

                            </thead>

                            <tbody>

                            <tr>

                                <td width="15%"><label for="">申请页宣传图片</label></td>
                                <td>
                                    <button type="button" class="layui-btn u-upload-pic"
                                            data-name="db[commission_apply_banner]"><i class="layui-icon">&#xe67c;</i>上传图片
                                    </button>
                                    <div class="m-pic">
                                        <ul>
                                            {:attach_html($db['commission_apply_banner'],
                                            'db[commission_apply_banner]')}
                                        </ul>
                                    </div>
                                </td>
                            </tr>

                            <tr>
                                <td width="15%"><label>申请必须完善资料</label></td>
                                <td>
                                    <input type="radio" name="db[commission_apply_full_info]" value="1" title="是" {if
                                           condition=" isset($db['commission_apply_full_info']) && ($db['commission_apply_full_info'] eq 1)"
                                           } checked{/if} />
                                    <input type="radio" name="db[commission_apply_full_info]" value="0" title="否" {if
                                           condition=" isset($db['commission_apply_full_info']) && ($db['commission_apply_full_info'] eq 0)"
                                           } checked{/if} />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2"><label>申请协议</label></td>
                            </tr>
                            <tr>
                                <td colspan="2"><textarea name="db[commission_apply_agree]" style="width:100%;height:300px;visibility:hidden;">
                                    {$db.commission_apply_agree|default=''}</textarea></td>

                                <script>
                                    KindEditor.ready(function (K) {
                                        var editor = K.create('textarea[name="db\\[commission_apply_agree\\]"]', {
                                            allowFileManager: true,
                                            uploadJson: uploadJson,
                                            fileManagerJson: fileManagerJson,
                                            afterBlur: function () {
                                                this.sync();
                                            }
                                        });
                                    });
                                </script>
                            </tr>

                            </tbody>

                        </table>

                    </div>

                    <div class="m-tab-con dn">

                        <table class="m-table">

                            <thead>

                            <tr>

                                <th colspan="6">文字设置</th>

                            </tr>

                            </thead>

                            <tbody>

                            <tr>

                                <td><label for="commission_text_center">分销中心</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer" name="db[commission_text_center]"
                                           id="commission_text_center" placeholder="默认为'分销中心'"
                                           value="{$db.commission_text_center|default='分销中心'}"/><span></span></td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_agent">分销商</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer" name="db[commission_text_agent]"
                                           id="commission_text_agent" placeholder="默认为'分销商'"
                                           value="{$db.commission_text_agent|default='分销商'}"/><span></span></td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_charge">佣金</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer" name="db[commission_text_charge]"
                                           id="commission_text_charge" placeholder="默认为'佣金'"
                                           value="{$db.commission_text_commission_order|default='佣金'}"/><span></span>
                                </td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_withdraw">提现</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer" name="db[commission_text_withdraw]"
                                           id="commission_text_withdraw" placeholder="默认为'提现'"
                                           value="{$db.commission_text_withdraw|default='提现'}"/><span></span></td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_commission_charge">分销佣金</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer"
                                           name="db[commission_text_commission_charge]"
                                           id="commission_text_commission_charge" placeholder="默认为'分销佣金'"
                                           value="{$db.commission_text_commission_charge|default='分销佣金'}"/><span></span>
                                </td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_commission_order">分销订单</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer"
                                           name="db[commission_text_commission_order]"
                                           id="commission_text_commission_order" placeholder="默认为'分销订单'"
                                           value="{$db.commission_text_commission_order|default='分销订单'}"/><span></span>
                                </td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_visible_withdraw_charge">可提现佣金</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer"
                                           name="db[commission_text_visible_withdraw_charge]"
                                           id="commission_text_visible_withdraw_charge" placeholder="默认为'可提现佣金'"
                                           value="{$db.commission_text_visible_withdraw_charge|default='可提现佣金'}"/><span></span>
                                </td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_applied_charge">已申请佣金</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer"
                                           name="db[commission_text_applied_charge]" id="commission_text_applied_charge"
                                           placeholder="默认为'已申请佣金'"
                                           value="{$db.commission_text_applied_charge|default='已申请佣金'}"/><span></span></td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_checked_charge">待打款佣金</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer"
                                           name="db[commission_text_checked_charge]" id="commission_text_checked_charge"
                                           placeholder="默认为'待打款佣金'"
                                           value="{$db.commission_text_checked_charge|default='待打款佣金'}"/><span></span></td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_withdrew_charge">已提现佣金</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer"
                                           name="db[commission_text_withdrew_charge]"
                                           id="commission_text_withdrew_charge" placeholder="默认为'已提现佣金'"
                                           value="{$db.commission_text_withdrew_charge|default='已提现佣金'}"/><span></span></td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_unsettled_charge">未结算佣金</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer"
                                           name="db[commission_text_unsettled_charge]"
                                           id="commission_text_unsettled_charge" placeholder="默认为'未结算佣金'"
                                           value="{$db.commission_text_unsettled_charge|default='未结算佣金'}"/><span></span></td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_invalid_charge">无效佣金</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer"
                                           name="db[commission_text_invalid_charge]" id="commission_text_invalid_charge"
                                           placeholder="默认为'无效佣金'"
                                           value="{$db.commission_text_invalid_charge|default='无效佣金'}"/><span></span></td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_child">下线</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer" name="db[commission_text_child]"
                                           id="commission_text_child" placeholder="默认为'下线'"
                                           value="{$db.commission_text_child|default='下线'}"/><span></span></td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_first_child">一级下线</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer" name="db[commission_text_first_child]"
                                           id="commission_text_first_child" placeholder="默认为'一级下线'"
                                           value="{$db.commission_text_first_child|default='一级下线'}"/><span></span></td>

                            </tr>
                            <tr>

                                <td><label for="commission_text_second_child">二级下线</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer"
                                           name="db[commission_text_second_child]" id="commission_text_second_child"
                                           placeholder="默认为'二级下线'"
                                           value="{$db.commission_text_second_child|default='二级下线'}"/><span></span></td>

                            </tr>

                            <tr>

                                <td><label for="commission_text_third_child">三级下线</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer" name="db[commission_text_third_child]"
                                           id="commission_text_third_child" placeholder="默认为'三级下线'"
                                           value="{$db.commission_text_third_child|default='三级下线'}"/><span></span></td>

                            </tr>

                            <tr>

                                <td><label for="commission_text_union">元</label></td>

                                <td><input type="text" class="u-ipt u-ipt-longer" name="db[commission_text_union]"
                                           id="commission_text_union" placeholder="默认为'元'"
                                           value="{$db.commission_text_union|default='元'}"/><span></span></td>

                            </tr>


                            </tbody>

                        </table>

                    </div>

                    <div class="m-form-btn"><input type="hidden" name="option_name" value="distribution_info"/><input
                            type="hidden" name="id" value="4">
                        <button id="j_btn" class="u-btn">确定提交</button>
                    </div>

                </form>

            </div>

        </div>

    </div>

</div>

{/block}
{block name="extrajs"}
<script src="__STATIC__/public/js/jquery-ui.min.js"></script>
<script>
    $(function () {
        var keyValue;
        var keyValue1;
        var keyValue2;
        keyValue = $('input[name="db[commission_level]"]:checked ').val();
        keyValue1 = $('input[name="db[commission_become]"]:checked ').val();
        keyValue2 = $('input[name="db[commission_charge_type]"]:checked ').val();
        if (keyValue == 0) {
            $("#commission_charge_type").hide();
            $("#commission_charge_first").hide();
            $("#commission_charge_second").hide();
        }
        if (keyValue == 1) {
            $("#commission_charge_type").show();
            $("#commission_charge_first").show();
            $("#commission_charge_second").hide();
        }
        if (keyValue == 2) {
            $("#commission_charge_type").show();
            $("#commission_charge_first").show();
            $("#commission_charge_second").show();
        }

        if (keyValue1 == 0 || keyValue1 == 1) {
            $("#commission_become_order_count").hide();
            $("#commission_become_money_count").hide();
            $("#commission_become_goods_id").hide();
        }
        if (keyValue1 == 2) {
            $("#commission_become_order_count").show();
            $("#commission_become_money_count").hide();
            $("#commission_become_goods_id").hide();
        }
        if (keyValue1 == 3) {
            $("#commission_become_order_count").hide();
            $("#commission_become_money_count").show();
            $("#commission_become_goods_id").hide();
        }
        if (keyValue1 == 4) {
            $("#commission_become_order_count").hide();
            $("#commission_become_money_count").hide();
            $("#commission_become_goods_id").show();
        }


        if (keyValue2 == 0) {
            $(".danwei").text('元');
        }
        if (keyValue2 == 1) {
            $(".danwei").text('%');
        }

    })
    layui.use('form', function () {
        var form = layui.form;

        form.on('radio(commission_level)', function (data) {

            if ($('input[name="db[commission_level]"]:checked ').val() == 0) {
                $("#commission_charge_type").hide();
                $("#commission_charge_first").hide();
                $("#commission_charge_second").hide();
            }
            if ($('input[name="db[commission_level]"]:checked ').val() == 1) {
                $("#commission_charge_type").show();
                $("#commission_charge_first").show();
                $("#commission_charge_second").hide();
            }
            if ($('input[name="db[commission_level]"]:checked ').val() == 2) {
                $("#commission_charge_type").show();
                $("#commission_charge_first").show();
                $("#commission_charge_second").show();
            }
            form.render();
        });

        form.on('radio(commission_charge_type)', function (data) {

            if ($('input[name="db[commission_charge_type]"]:checked ').val() == 0) {
                $(".danwei").text('元');
            }
            if ($('input[name="db[commission_charge_type]"]:checked ').val() == 1) {
                $(".danwei").text('%');
            }
            form.render();
        });

        form.on('radio(commission_become)', function (data) {

            if ($('input[name="db[commission_become]"]:checked ').val() == 0 || $('input[name="db[commission_become]"]:checked ').val() == 1) {
                $("#commission_become_order_count").hide();
                $("#commission_become_money_count").hide();
                $("#commission_become_goods_id").hide();
            }
            if ($('input[name="db[commission_become]"]:checked ').val() == 2) {
                $("#commission_become_order_count").show();
                $("#commission_become_money_count").hide();
                $("#commission_become_goods_id").hide();
            }
            if ($('input[name="db[commission_become]"]:checked ').val() == 3) {
                $("#commission_become_order_count").hide();
                $("#commission_become_money_count").show();
                $("#commission_become_goods_id").hide();
            }
            if ($('input[name="db[commission_become]"]:checked ').val() == 4) {
                $("#commission_become_order_count").hide();
                $("#commission_become_money_count").hide();
                $("#commission_become_goods_id").show();
            }
            form.render();
        });



    });



</script>
{include file="public:upload"/}
{/block}
